<?php
//拿铁咖啡
class SuRongCoffee extends Coffee {
    protected $price = 18.2;   //价格
    protected $num;     //数量
    public function __construct()
    {
        $this->description = '拿铁咖啡';
    }

    public function buy($num)
    {
        $this->num = $num;
    }

    public function cost()
    {
        return $this->price * $this->num;
    }
}